//
//  UILabel+Extension.swift
//  Swift_Weibo
//
//  Created by Tim on 2019/8/13.
//  Copyright © 2019 Tim. All rights reserved.
//  UILabel 扩展

import UIKit

extension UILabel {
    
    /// 快速创建标签
    ///
    /// - Parameters:
    ///   - text:       标签文字
    ///   - fontSize:   文字大小
    ///   - textColor:  文字颜色
    /// - Returns:      创建好的标签
    class func textLabel(text: String, fontSize: CGFloat, textColor: UIColor) -> UILabel {
        let lb = UILabel()
        lb.text = text
        lb.font = UIFont.systemFont(ofSize: fontSize)
        lb.textColor = textColor
        lb.numberOfLines = 0
        lb.sizeToFit()
        return lb
    }
}
